package com.example.activity_service.dao;


import com.example.activity_service.vo.Signin;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface Signindao {

    @Select("select * from t_sign")
    List<Signin> qd();

    @Delete("delete from t_sign where id=#(id)")
    int expurgate(int id);

    @Insert("insert into t_sign (userid,datemonth,mask ,continuesignmonth) values('$(userid)','$(datemonth)','$(mask)','$(continuesignmonth)')")
    void cancel(int userid, Date datemonth, int mask, int continuesignmoth);

    @Update("update t_sign set userid='${userid}',datemonth='${datemonth}',mask='${mask}',continuesignmonth='$continuesignmonth' where id='$id'")
    int amend(int id, int userid, Date datemonth, int mask, int continuesignmonth);
}
